"""Audio alert playback (moved from io/)."""
try:
    import simpleaudio as sa  # type: ignore
except Exception:
    sa = None


def play_wav(path: str):
    if sa is None:
        return False
    try:
        wave_obj = sa.WaveObject.from_wave_file(path)
        play_obj = wave_obj.play()
        # non-blocking
        return True
    except Exception:
        return False

